package com.lngsyz.eseal.base.enumeration;

/**
 * @author Administrator
 *
 */
public enum DeliveryMethod {
	SELF("自取", "1"),
	MAIL("邮寄", "2");

	private String name;
	private String key;

	private DeliveryMethod(String name, String key) {
		this.name = name;
		this.key = key;
	}
	public static String getNameByKey(String key) {
		for(DeliveryMethod state : DeliveryMethod.values()) {
			if(state.getKey().equalsIgnoreCase(key)) {
				return state.getName();
			}
		}
		return "";
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}

}
